<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo site_url('static/style/css/style.css');?>" />
<title>无标题文档</title>
</head>

<body>
<table width="95%" border="0" cellspacing="0">
  <tr>
    <td>
    <h3>奖项列表</h3>
    <input type="button" value="添加奖项"  onclick="window.location='<?php echo base_url('adminroot/reward/addreward');?>'"/>
    <input type="button" value="已启动奖项"  onclick="window.location='<?php echo base_url('adminroot/reward/index/enabled/1/page/1');?>'"/>
    <input type="button" value="全部列表"  onclick="window.location='<?php echo base_url('adminroot/reward/index/enabled/0/page/1');?>'"/>
   <input type="button" value="已结束"  onclick="window.location='<?php echo base_url('adminroot/reward/index/enabled/3/page/1');?>'"/>
    </td>
  </tr>
  <tr>
    <td height="76" valign="top">
    <table width="100%" border="0" cellspacing="1" bgcolor="#CCCCCC" align="center">
      <tr align="center">
        <td width="20%" height="31" bgcolor="#999999">活动信息</td>
        <td width="15%" bgcolor="#999999">奖励金额</td>
        <td width="23%" bgcolor="#999999">图片</td>
        <td width="12%" bgcolor="#999999">单位金额</td>
        <td width="5%" bgcolor="#999999">中奖率</td>
        <td width="5%" bgcolor="#999999">总号数</td>
        <td width="10%" bgcolor="#999999">状态</td>
        <td width="10%" bgcolor="#999999">&nbsp;</td>
      </tr>
      <?php foreach($list as $key => $value){ ?>
      <tr align="center">
        <td height="34" bgcolor="#FFFFFF"><?=$value->infos?></td>
        <td bgcolor="#FFFFFF"><?=$value->prices?></td>
        <td bgcolor="#FFFFFF"><img src="<?php echo site_url('/upload/reward/'.$value->rewardpic);?>" /></td>
        <td bgcolor="#FFFFFF"><?=$value->singleprice?></td>
        <td bgcolor="#FFFFFF"><?=$value->probability?></td>
        <td bgcolor="#FFFFFF"><?=$value->rnum?></td>
        <td bgcolor="#FFFFFF">
               <?php if($value->enabled == 1){?>
                <span style="color: #00CC00">启动</span>
                <?php }elseif($value->enabled == 2){?>
                <span style="color: #FF0099">已结束</span>
                <?php }elseif($value->enabled == 0){?>
                <span style="color: red">未启动</span>
                <?php }?>
        </td>
        <td bgcolor="#FFFFFF">
                <?php if($value->enabled == 1){?>
              
                <input type="button" value="强制结束"/>
                <?php }?>
        <?php if($value->enabled == 0){?>
       
         <input type="button" value="启动"/>
        <?php }?>
        <br/>
         <?php if($value->enabled != 2){?>
        <a href="<?php echo base_url('adminroot/reward/edit_reward/id/'.$value->id);?>">编辑</a>
        <br/>
        <a href="<?php echo base_url('adminroot/reward/del_reward/id/'.$value->id);?>" onClick="javascript:delcfm();">删除</a>
        <?php 
         }
        ?>
         </td>
      </tr>
      <?php } ?>
	  <tr>
        <td height="34" colspan="8" align="center" bgcolor="#FFFFFF"><?php echo $page?></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
